package view;

import helper.Utils;
import model.Register;

public class RegisterViewHex extends RegisterView {

	private static final long serialVersionUID = 1L;
	private static final String COLUMN_NAME = "Hex value";

	public String getColumnName() {
		return COLUMN_NAME;
	}

	@Override
	public String convertValue(Register value) {

		return Utils.zeroFiller(Integer.toHexString(value.getValue()),
				(int) Math.ceil((float) this.getRegisterWidth() / 4));
	}
}
